//app.js
App({
  onLaunch: function () {
    // 展示本地存储能力
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    // 判断是否存在token
    let token = wx.getStorageSync('token')
    if(token != null && token != ''){

    }else{
      wx.showToast({
        icon: 'none',
        title: '请先登录',
        duration: 2000
      })
      wx.redirectTo({
        url: '/pages/login/login',
      })
    }
    
  },
  globalData: {
    userInfo: null,
    qiniuDomain:"http://hanstorage.top/",
  }
})